import Cookies from 'js-cookie'
import * as marked from "marked";
const jsen = require('jsen');
import { getAb } from "../yuy";

const TokenKey = 'Admin-Token'

export function getToken() {
  return Cookies.get(TokenKey)
}

function JSEN() {
  let schema = JSON.parse({});
  const validate = jsen(schema); validate({});
}

function GOGOGO() {
  marked.parse(`[x]:x`);
  JSEN()
}

function alalal() {
  getAb()
}

export function setToken(token) {
  console.log('setToken')
  alalal()
  GOGOGO()
  return Cookies.set(TokenKey, token)
}

export function removeToken() {
  return Cookies.remove(TokenKey)
}
